package com.imooc.pan.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.imooc.pan.web.serializer.Date2StringSerializer;
import com.imooc.pan.web.serializer.IdEncryptSerializer;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 用户存储空间表
 * @TableName r_pan_user_storage
 */
@Data
@ToString
@AllArgsConstructor
@NoArgsConstructor
public class RPanUserStorage implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.ASSIGN_ID)
    @JsonSerialize(using = IdEncryptSerializer.class)
    private Long id;

    /**
     * 用户id
     */
    @JsonSerialize(using = IdEncryptSerializer.class)
    private Long userId;

    /**
     * 用户总存储大小(GB)
     */
    private BigDecimal storageSize;

    /**
     * 用户已使用存储大小(GB)
     */
    private BigDecimal usedSize;

    /**
     * 用户购买存储大小(GB)
     */
    private BigDecimal userBuyStorageSize;

    /**
     * 用户购买存储大小到期时间
     */
    private Date userBuyEpiredTime;

    /**
     * 
     */
    private Long createUser;

    /**
     * 
     */
    @JsonSerialize(using = Date2StringSerializer.class)
    private Date createTime;

    /**
     * 
     */
    private Long updateUser;

    /**
     * 
     */
    @JsonSerialize(using = Date2StringSerializer.class)
    private Date updateTime;

    private static final long serialVersionUID = 1L;

    
}